<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06_函数</title>
</head>
<body>
<script>
    function f1(){
        console.log('f1被调用了');
    }
    f1();
    function f2(k){
        console.log('f2被调用了');
        console.log(k);
    }
    f2('hello');
    f2(666);
    f2(false);

    function f3(a,b){
        console.log('f3被调了');
        console.log(a,b);
        console.log(a+b);
    }
    f3(10,20);
    f3(10.5,20.5,30.5);
    f3(222,false);
    f3(1);

    function f4(a,b){
        console.log('f4被调了');
        return a+b;
    }
    var res = f4(10,20);
    console.log(res);
    console.log(f4(10,20));

    (function(){
        console.log('匿名函数被调用了');
    })();

    var f5 = function(){
        console.log('f5被调了');
    }
    f5();
    console.log(f5);
    console.log(typeof f5);

    const f6 = () =>{
        console.log('f6函数被执行了');
    }
    f6();
</script>
</body>
</html>